<template>
	<!-- 调用组件 -->
	<div>
    <home-header></home-header>
    <home-swipers :swiperList='swiperList'></home-swipers>
    <home-icon :iconlist='iconlist'></home-icon>
     <home-activity></home-activity>
    <home-loacl></home-loacl>
    <home-hot :HotList='HotList'></home-hot>
    <home-like :likeList='likeList'></home-like>
    <home-week :weekList='weekList'></home-week>
    <home-foot></home-foot>
  </div>
</template>

<script>
	//引入Header.vue
	import HomeHeader from './pages/Header'
	import HomeSwipers from './pages/Swipers'
	import HomeIcon from './pages/Icon'
  import HomeActivity from './pages/Activity'
	import HomeLoacl from './pages/Loacl'
	import HomeHot from './pages/Hot'
	import HomeLike from './pages/Like'
	import HomeWeek from './pages/Week'
	import HomeFoot from './pages/Foot'
	//导出组件HomeHeader


	export default{
		components:{
			HomeHeader,
			HomeSwipers,
			HomeIcon,
			HomeActivity,
			HomeLoacl,
			HomeHot,
			HomeLike,
			HomeWeek,
			HomeFoot,

		},
		data(){
			return{
				swiperList : [],
				iconlist : [],
				HotList : [],
				likeList : [],
				weekList : [],
			}
		},
		mounted(){
			this.$http.get('/api/dataHome.json').then( (res)=>{
				const msg = res.data.data[0];
        // console.log(msg)
				this.swiperList = msg.swiperList;
				this.iconlist = msg.iconlist;
				this.HotList = msg.HotList;
				this.likeList = msg.likeList;
				this.weekList = msg.weekList;
				// console.log(this.HotList)

			})
		}
	}
</script>

<style scoped>
	/* .home{
		background-color:#FFFFFF;
	} */
</style>
